home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Programming
/
EasyTools
/
EASYtext
< prev
next >
Wrap
Text File
|
1996-12-13
|
3KB
|
131 lines
/*
$VER: EASYtext 1.1 (05.04.96) by David De Groot
This script works with 'textguide' and 'htmlless' in your c: dir
*/
signal on break_c
options failat 21
NL = '0a'x
bool = exists('libs:rexxreqtools.library')
if BOOL = 0 then say "You need RexxReqTools.library"
else call addlib('rexxreqtools.library',0,-30)
say ""
say "
EASY does it... "
say "
"
call rtezrequest("Convert a GUIDE or an HTML-file to text?",,
"_Guide|_Html","Tell me", 'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 1
then call convguide
else call convhtml
convguide:
tcheck = exists('c:textguide')
if tcheck = 0
then do
call rtezrequest("TEXTGUIDE is not in C:.",,
"Sorry!","ATTENTION!!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
exit
end
else
guidename = rtfilerequest('ram:', , "Pick a guide to convert:",,,
'rt_reqpos=reqpos_centerscr')
if rtresult == 0 then
call rtezrequest("You picked no guide...",,
"Goodbye", "Heho!" ,,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else
textname = rtgetstring(,"Enter a name for the textfile:" nl,
"(textfile will be saved to ram:)",,
"Just do it! :-)", "_Ok|_Cancel",,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if textname = ""
then call rtezrequest("You didn't type in a name" nl,
"or cancelled the operation.",,
"Right", "Don't say it's TRUE..." ,,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 1
then do
address command
'textguide ' || guidename || ' ram:' || textname || ''
say "
"
say " See you again! "
say "
"
end
exit
convhtml:
hcheck = exists('c:htmless')
if hcheck = 0
then do
call rtezrequest("HTMLess is not in C:.",,
"Sorry!","ATTENTION!!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
exit
end
else
htmlname = rtfilerequest('ram:',,"Pick a HTMLfile to convert:",,,
'rt_reqpos=reqpos_centerscr')
if rtresult == 0 then do
call rtezrequest("You picked no file...",,
"Goodbye", "Heho!" ,,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
exit
end
else
call rtezrequest("How do you want text to be formatted?" nl "" nl,
" 1. 80 columns" nl,
" 2. 60 columns" nl,
" 3. 40 columns" nl, "",
"_1|_2|_3|_Quit",,'rt_reqpos=reqpos_centerscr')
if rtresult == 1 then call fcommand('-hc80')
if rtresult == 2 then call fcommand('-h -c0060')
if rtresult == 3 then call fcommand('-h -c0040')
if rtresult == 0 then exit
fcommand:
address command
'htmless ' || arg(1) || ' ' || htmlname || ''
call rtezrequest("You can find the textfile right under:" nl,
"" || htmlname || "",,
"Thanks!","EASYtext by David De Groot",,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
say "
"
say " See you again! "
say "
"
exit